#封装函数

def convert_currency(im,er):
    out = im * er
    return out
USD_VS_RMB = 6.77

currency_str_value = input('请输入带单位的金额:')

unit = currency_str_value[-3:]

if unit == 'CNY':
    exchange_rate = 1 / USD_VS_RMB
elif unit == 'USD':
    exchange_rate = USD_VS_RMB
else:
    exchange_rate = -1
if exchange_rate !=-1:
    in_money = eval(currency_str_value[:-3])
    Qut_money = convert_currency(in_money,exchange_rate)
    print('兑换后金额:',Qut_money,'$')
else:
    print('不支持该货币~!')